turf
	grass
		icon = 'turf.dmi'
		icon_state = "grass"
	water
		icon = 'turf.dmi'
		icon_state = "water"


		verb
			Fill() //fills the water can
				set src in oview(1)

				var/obj/tools/wc/o = locate(/obj/tools/wc) in usr.contents //checks if a watering can is in the users inventory

				if(o) //if it is, execute all of this crap (this code checks makes sure that the uses in the can dont go above a default max, and otherwise fills it by 3 uses till that point)
					if(o.uses < o.maxuses)
						o.uses += 3
						if(o.uses >= o.maxuses)
							o.uses = o.maxuses
						usr << "Filled uses by 3"
					else if(o.uses >= o.maxuses)
						usr << "Already Full!"
	dirt
		icon = 'turf.dmi'
		icon_state = "dirt"

		var
			tilled = 0
			seeded = 0
			watered = 0
			seededn = ""

		verb
			Till() //tilling coding
				set src in oview(1)

				var/obj/tools/hoe/o = locate(/obj/tools/hoe) in usr.contents

				if(o)
					if(src.tilled == 0)
						src.icon_state = "dirt_T"
						src.tilled = 1
						usr << "Tilled [src]"
					else
						usr << "Dirt already tilled!"
						return


			Water() //water coding
				set src in oview(1)

				var/obj/tools/wc/o = locate(/obj/tools/wc) in usr.contents

				if(o)
					if(o.uses == 0)
						usr << "No Water in the can!"
						return
					else if(o.uses >= 0)
						if(src.tilled == 0)
							usr << "Need to till [src] first!"
						else if(src.watered == 0)
							usr << "Watered [src]!"
							o.uses -= 1
							src.watered = 1
/*
			Seed_ps()
				set src in oview(1)

				var/obj/bag/o = locate(/obj/bag/ps) in usr.contents

				if(o)
					if(o.type == /obj/bag/ps)
						if(src.tilled == 1)
							src.seeded = 1
							src.seededn = "Potato"
							src.icon_state = "dirt_T_S"
							del(o)
						else
							usr << "\red Need to till first!"
				else
					usr << "\red No seeds in inv!"

			Seed_cs()
				set src in oview(1)

				var/obj/bag/o = locate(/obj/bag/cs) in usr.contents

				if(o)
					if(o.type == /obj/bag/cs)
						if(src.tilled == 1)
							src.seeded = 1
							src.seededn = "Cabbage"
							src.icon_state = "dirt_T_S"
							del(o)
						else
							usr << "\red Need to till first!"

				else
					usr << "\red No seeds in inv!"
					*/

			Examine()
				set src in oview(3)

				usr << "\green This is a dirt Field."

				if(src.seeded)
					usr << "\green It is seeded with [src.seededn] seeds."